﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>slice() 메서드로 지정된 개체만 가져오기</title>

    <style type="text/css">
        .red { color:Red; }
    </style>

    <script src="jquery-1.6.2.js" type="text/javascript"></script>

    <script type="text/javascript">
   
    
         $(document).ready(function() {
        	
        	$('input')
        	
        });
        	
    //    	$('#b').bind("click",function(){
    //        	alert('b').addClass(red);
    //        });
    
    //alert("현재 웹 페이지에는 " + $('input').size() + "개의" );
	//$('input') .slice(0,4) .addClass('red');


       
    </script>
</head>

<body>

<h1>2번째와 3번째 버튼에만 빨간 글씨 적용</h1>

<input id="a" type="button" value="버튼" />
<input id="b" type="button" value="버튼" />
<input id="c" type="button" value="버튼" />
<input id="d" type="button" value="버튼" />

</body>

</html> 
